<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('photo','PhotoController@index');        //获取该用户的所有相册
Route::post('upload','PhotoController@upload');
Route::delete('delPhoto','PhotoController@delPhoto');

//相册相关操作
Route::resource('album','AlbumController');
Route::post('updateThumb','AlbumController@updateThumb');         //更新相册封面


//添加用户
Route::post('addUser','UserController@addUser');

//添加用户到相册
Route::post('addUserToAlbum','UserAlbumController@addUserToAlbum');

//获取相册
Route::get('getPhotos','PhotoController@getPhotos');